<template>
  <div class="activity-details">
    <div class="activity-details-title">
     <div class="flex items-center">
      <d-button @click="handleBack">返回日历</d-button>
      <p class="activity-details-title-date">{{ data.date }} {{ data.week }}</p>
     </div>
      <slot name="checkbox"></slot>
    </div>
    <div class="activity-details-content">
      <ActivityList :activity="data.data" />
    </div>
  </div>
</template>
<script lang="ts" setup>
import { computed } from 'vue'
import { useTimeFormat } from '@/composables/hooks/useTimeFormat'
import newTag from './newTag.vue'
import ActivityList from './activityList.vue'

const emit = defineEmits(['handleBack'])

const props = defineProps({
  data: {
    type: Object,
    default: () => {}
  }
})
const { formatTime } = useTimeFormat();
const title = computed(() => {
  return props.data?.data[0]?.title
})
const handleBack = () => {
  // router.back()
  emit('handleBack')
}
</script>
<style lang="scss" scoped>
.activity-details-title{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  &-date{
    font-size: 20px;
    font-weight: 600;
    margin-left: 32px;
  }
}
.activity-details-content{
 .activity-details-content-item{
  padding: 16px;
 }
}
.points{
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: var(--devui-aide-text);
  margin: 0 5px;
}
</style>

